@thallylabs/migrate 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1406 -173
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,25 @@ instead of silently dropping that API tab's reference. AsyncAPI has no Thally
|
|
|
26
26
|
renderer, so it always produces a clear warning naming the spec instead of
|
|
27
27
|
disappearing.
|
|
28
28
|
|
|
29
|
+
In-content links to auto-generated API operation pages are rewritten to the
|
|
30
|
+
matching Thally `/api/...` route. A link under a known API section that matches
|
|
31
|
+
no operation points to that section's overview page instead, and one warning
|
|
32
|
+
lists the affected links (up to ten). A Mintlify default version's pages also
|
|
33
|
+
get a redirect from their address without the version segment, since the
|
|
34
|
+
original site serves them both ways.
|
|
35
|
+
|
|
36
|
+
A repository is limited to 5,000 documentation files and, separately, 5,000
|
|
37
|
+
asset files. Past that, files are kept in navigation order with the default
|
|
38
|
+
version first, then pages not listed in navigation, and one warning counts and
|
|
39
|
+
names (the first three of) the pages left out and suggests `--docs-dir` to
|
|
40
|
+
migrate a smaller part of the repository. Scanning itself stops after 100,000
|
|
41
|
+
files with its own warning. Individual assets over 25 MB, or beyond 500 MB in
|
|
42
|
+
total, are not copied and are warned about one by one.
|
|
43
|
+
|
|
44
|
+
Headings written with an explicit `{#custom-id}` become a preceding
|
|
45
|
+
`<a id="custom-id"></a>` anchor and keep their text, so links to that id still
|
|
46
|
+
work and the page still compiles as MDX.
|
|
47
|
+
|
|
29
48
|
Docusaurus sidebars are parsed as bounded, data-only JSON5—never executed—and
|
|
30
49
|
preserve explicit categories, autogenerated slices, document IDs/slugs,
|
|
31
50
|
positions, generated indexes, admonitions, tabs, and `static/` assets where
|
|
@@ -148,6 +167,23 @@ the callback cannot be moved safely, it keeps the page and the control's child
|
|
|
148
167
|
content as a passive fallback, with a warning identifying the control. A
|
|
149
168
|
stateful local snippet component is kept as a client component instead of
|
|
150
169
|
flattening away its hooks and state.
|
|
170
|
+
A component a page declares itself (`export const Counter = () => ...`) that
|
|
171
|
+
calls a React hook is moved into its own `'use client'` module, together with
|
|
172
|
+
every page-local component, helper and constant it uses (a sibling it renders,
|
|
173
|
+
a dependency that is itself stateful, a value only reached through a prop),
|
|
174
|
+
in source order and under their original names. The imports that moved code
|
|
175
|
+
needs move with it. What the page still renders stays reachable: a server-safe
|
|
176
|
+
dependency the page also uses is kept in the page and copied, while a
|
|
177
|
+
client-only one is imported from the module. A page-local name always wins
|
|
178
|
+
over a same-named built-in. If any dependency cannot run in a client module
|
|
179
|
+
(server-only APIs such as `process` or `await`, an undeclared name, a package
|
|
180
|
+
the migration removed, a dynamic `import()`), the component is left where it
|
|
181
|
+
is and a warning names it and the blocker.
|
|
182
|
+
`<Snippet file="...">` accepts the documented `snippets/`-relative path as well
|
|
183
|
+
as a `/snippets/...` or page-relative one. An outer code fence that contains a
|
|
184
|
+
same-length nested fence is widened so the inner fence no longer closes it, and
|
|
185
|
+
a bare placeholder tag in prose (`<Feature> requires a plan`) that would stop
|
|
186
|
+
the page compiling is escaped as text rather than losing the page.
|
|
151
187
|
The Mintlify `search-bar-entry` click trigger is mapped to Thally's search
|
|
152
188
|
shortcut. Markdown mixed inside interactive JSX, computed imports, and
|
|
153
189
|
namespace imports are reported for manual review; unsupported source is
|
package/dist/index.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ interface MigrationPage {
|
|
|
159
159
|
openapi?: string;
|
|
160
160
|
body: string;
|
|
161
161
|
source: string;
|
|
162
|
+
/** Set when the page's frontmatter was invalid YAML; the page is kept with a best-effort salvage. */
|
|
163
|
+
frontmatterError?: string;
|
|
162
164
|
}
|
|
163
165
|
interface MigrationAsset {
|
|
164
166
|
/** Path below `public`, always normalized and traversal-free. */
|
|
@@ -389,6 +391,13 @@ declare function readFernConfig(fernRoot: string): {
|
|
|
389
391
|
declare function projectFernNavigation(input: {
|
|
390
392
|
config: Record<string, unknown>;
|
|
391
393
|
fernRoot: string;
|
|
394
|
+
/**
|
|
395
|
+
* The whole repository checkout — the security boundary for anything a
|
|
396
|
+
* config file references (e.g. a `versions:` file living outside
|
|
397
|
+
* `fern/`). Defaults to `fernRoot` for callers with no wider repository
|
|
398
|
+
* context (e.g. unit tests), which reproduces the previous fernRoot-only
|
|
399
|
+
* confinement.
|
|
400
|
+
*/
|
|
392
401
|
repositoryRoot?: string;
|
|
393
402
|
}): FernNavigationResult;
|
|
394
403
|
|